@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './theme.scss';

body {
  color: var(--text-color);
  background-color: var(--bg-color);

  .drop-background-class {
    background-color: #409EFFD1;
    border-radius: 4px;
  }

  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  //font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  //font-family: Menlo,Monaco,Consolas,"Courier New",monospace;;
  font-family: BlinkMacSystemFont, Inter, "Segoe UI", Roboto, Oxygen, sans-serif;
  .el-tooltip__popper .popper__arrow {
    border-width: 0;
  }

  .el-button.is-circle {
    line-height: 0;
  }

  .van-nav-bar {
    color: var(--text-color);
    background: var(--bg-color);
    &:after {
      border-bottom: 1px solid var(--vcontextmenu-border-color);
    }
  }

  .van-nav-bar__title {
    color: var(--text-color);
  }

  .van-dialog {
    color: var(--text-color);
    background: var(--bg-color);
    border: 1px solid var(--vcontextmenu-border-color);
    .van-dialog__footer {
      &:after {
        border-top: 1px solid var(--vcontextmenu-border-color);
      }
    }
  }

  .van-button--default {
    color: var(--text-color);
    background: var(--bg-color);
    &:active {
      background-color: var(--menu-hover);
    }
    &:after {
      border-left: 1px solid var(--vcontextmenu-border-color);
    }
  }
  .van-dialog__confirm, .van-dialog__confirm:active {
    color: #ee0a24;
  }
  .van-dialog__message--has-title {
    color: var(--text-color);
  }

  //.el-button {
  //  border-radius: 32px;
  //}
  //
  //.el-tag {
  //  border-radius: 8px;
  //}

  .el-message-box {
    border-radius: $popperBorderRadius;
    .el-button {
      border-radius: 20px;
    }
  }

  .el-message, .el-notification, .el-popover, .el-tooltip__popper, .el-dropdown-menu, .el-select-dropdown, .el-picker-panel, .el-picker-panel__body, .el-picker-panel__sidebar  {
    border-radius: $popperBorderRadius;
  }

  .el-popover.el-popper.upload-file {
    border-radius: 16px;
    padding: 8px;
    li {
      padding: 0 8px;
    }
  }

  .v-contextmenu {
    border-radius: 8px;
  }

  .el-popper.file-operation-history {
    padding: 0;
    border-radius: 16px;
    width: 300px !important;
    background-color: var(--file-history-bg-color);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    .el-scrollbar__wrap {
      border-radius: 16px;
    }
  }


  .tippy-box {
    border-radius: 10px;
  }

  .tippy-box[data-theme~=light] {
    border-radius: 12px;
    background-color: var(--tippy-box-bg-color);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border: var(--tippy-box-border);
    box-shadow: var(--tippy-box-box-shadow);

    .apple-tooltip-content {
      padding: 8px 12px; /* 增加内边距 */
      font-size: 12px; /* 稍小的基础字号 */
      line-height: 1.5; /* 增加行高提高可读性 */
      color: var(--tippy-box-apple-tooltip-content-color);
      text-align: left; /* 确保左对齐 */
      max-width: 300px;
    }

    .tooltip-row {
      display: flex; /* 使用 flex 布局方便对齐 */
      justify-content: space-between; /* 两端对齐，标签在左，值在右 */
      margin-bottom: 4px; /* 行间距 */
    }

    .tooltip-row:last-child {
      margin-bottom: 0; /* 最后一行无下边距 */
    }

    .tooltip-label {
      color: var(--tippy-box-tooltip-label-color); /* 标签使用浅灰色 */
      margin-right: 8px; /* 标签和值之间的间距 */
      flex-shrink: 0; /* 防止标签被压缩 */
    }

    .tooltip-value {
      color: var(--tippy-box-tooltip-value-color); /* 值使用更深的颜色 */
      word-break: break-all; /* 长内容（如路径、名称）自动换行 */
      text-align: right; /* 值右对齐，配合标签左对齐 */
    }

    .tooltip-value-path, .tooltip-value-name {
      word-break: break-all;
      text-align: left;
    }

  }

}

.time-filter-dropdown {
  min-width: 280px;
  padding: 15px;

  .time-picker-container {
    padding: 5px;
  }

  .time-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;

    .el-button {
      margin: 0;
      padding: 4px 8px;
      font-size: 12px;
      flex: 1 0 calc(33% - 8px);
    }
  }

  .custom-date-range {
    margin-top: 10px;
    border-top: 1px solid #ebeef5;
    padding-top: 10px;

    .date-range-title {
      margin: 0 0 10px;
      font-size: 12px;
      color: var(--text-color);
    }

    .modern-date-picker {
      width: 100%;
    }
  }
}

.size-filter-dropdown {
  min-width: 280px;
  padding: 15px;

  .size-slider-container {
    padding: 5px;
  }

  .size-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 12px;
  }

  .size-slider-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    justify-content: space-between;

    .el-button {
      margin: 0;
      padding: 4px 8px;
      font-size: 12px;
    }
  }
}

>>>::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 12px;
  height: 12px;
}
>>>::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  height: 30px;
  background-color: var(--scrollbar-thumb-color);

  -webkit-border-radius: 7px;
  outline: 2px solid var(--scrollbar-track-piece-color);
  outline-offset: -2px;
  border: 2px solid var(--scrollbar-track-piece-color);
}
>>>::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover-color);
}
>>>::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  /*box-shadow   : inset 0 0 5px rgba(0, 0, 0, 0.2);*/
  /*background   : #ffffff;*/
  /*border-radius: 10px;*/
}
>>>::-webkit-scrollbar-track-piece {
  background-color: var(--scrollbar-track-piece-color);
  -webkit-border-radius: 3px;
}

label {
  font-weight: 700;
}

html {
  font-size: 1rem!important;
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// main-container global css
.app-container {
  padding: 20px;
}

.fade-enter,
.fade-leave-active {
  opacity: 0;
}
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.al-icon-picker-popper.el-popover {
  max-width: 100%;
  padding: 4px 3px 15px 15px;
}
.al-icon-picker-popper {
  .el-card {
    margin: 10px 12px 0 0;
  }
  .el-scrollbar__wrap {
    overflow-x: hidden;
    margin-right: 0!important;
    &::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
  }
  .el-scrollbar__bar.is-vertical{
    width: 6px!important;
  }
  .el-tabs .el-tabs__header {
    margin: 0;
  }
  .el-card__body {
    padding: 0;
  }
  .el-tabs .el-tabs__item {
    padding: 0 12px!important;
  }
  .al-icon-picker-item {
    display: block;
    padding: 8px 0;
    font-size: 20px;
    text-align: center;
    transition: transform .1s;
    cursor: pointer;
  }
  .al-icon-picker-item:hover {
    transform: scale(1.5);
  }
}
.al-card-border {
  border: 1px solid #ededed;
}
.al-select {
  .el-scrollbar__wrap {
    &::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
  }
  .el-scrollbar__bar.is-vertical{
    width: 6px!important;
  }
}
.al-file-sort-item {
  .al-file-sort-item-icon {
    font-weight: 600;
    margin-right: 0;
  }
}
.al-file-sort-item.active {
  color: #40a9ff;
}

.al-file-sort-item:not(.active) .al-file-sort-item-icon {
  visibility: hidden;
}

input:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill {
  background-color:transparent;
  background-image: none;
  transition: background-color 50000s ease-in-out 0s;
}

input {

  background-color:transparent;

}

kbd {
  display: inline-block;
  margin-left: 3px;
  padding: 4px 4px;
  font: 12px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);
  line-height: 10px;
  color: var(--text-color);
  vertical-align: middle;
  background-color: var(--kbd-bg-color);
  border: solid 1px rgba(175, 184, 193, .2);
  border-radius: 6px;
  -webkit-box-shadow: inset 0 -1px 0 rgba(175, 184, 193, .2);
  box-shadow: inset 0 -1px 0 rgba(175, 184, 193, .2);
}
.clipboard-popover {
  padding: 0 !important;
}

.clipboard-operation-popover {
  max-width: 500px;
}
